/**
 * @file Assignment_C.cpp
 * @brief 
 * @author htli (3180102114@zju.edu.cn)
 * @version 1.0
 * @date 2021-10-03
 * 
 * @copyright Copyright (c) 2021  linhuo2020
 * 
 */
#include "NewtonSolver.h"
double f(const double x)
{
    return x - tan(x);
};
double df(const double x)
{
    return -tan(x) * tan(x);
};
int main()
{
    NewtonSolver A(f, df);
    A.set_max_iteration(500);
    A.set_tolerance(1e-8);
    std::cout << "C." << std::endl;
    A.set_init(4.5);
    A.solve();
    A.set_init(7.7);
    A.solve();
};